/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package validator;

/**
 *
 * @author Chris
 */
public class validGroupName extends validator {
    public validGroupName() { err = ERRORS.VALID; }
    
    public boolean isValid(String name) {
        if(name == null) {
            err = ERRORS.INVALID_GROUP;
            return false;
        }
        if(name.matches("([A-Z]|[a-z]|[0-9])+")) {
            err = ERRORS.VALID;
            return true;
        }
        err = ERRORS.INVALID_GROUP;
        return false;
    }
}
